import Vue from 'vue'
import Vuex from 'vuex'
import MusicList from './module/musiclist'
import Audio from './module/audio'

Vue.use(Vuex);

const store = new Vuex.Store({
  state:{
    allInfo:[],
  },
  getters:{
    getAllinfo: state => state.allInfo,

    //获取推荐歌单信息
    getFindMusic:state => state.musicAllList.findmusic ,
  },
  mutations:{
    setAllInfo(state,obj){
      state.allInfo = obj;
    }
  },
  actions:{
    set_AllInfo({commit},obj){
      commit('setAllInfo',obj);
    }
  },

  modules:{
    musiclist:MusicList,
    audio:Audio,
  }
})

export default store
